package edu.ptit.jad.preprocess.analysis;

import java.util.Arrays;
import java.util.List;
import java.util.Set;

import org.apache.lucene.analysis.CharArraySet;

import edu.ptit.jad.data.DataAccess;
import edu.ptit.jad.exception.AdException;

/**
 * 
 * @author PhuongDo Get vietnamese stopwords
 */
public final class VietnameseStopWords {



	public static Set<?> getStopWords() throws AdException {

		List<String> stopWords;

		stopWords = DataAccess.getInstance().getStopWords();

		@SuppressWarnings({ "deprecation", "deprecation" })
		final CharArraySet stopSet = new CharArraySet(stopWords.size(), false);
		stopSet.addAll(stopWords);
		return CharArraySet.unmodifiableSet(stopSet);

	}

}
